External storage device within a computer network

ABSTRACT

An external storage device for storing data includes judgment means and access processing means. The judgment means determines whether or not a data block can be recorded by using a specific data pattern. The judgment means determines that a data block can be recorded by using a specific data pattern when the data block and the data pattern are coincident with each other. The access processing means stores identification information for identifying a specific data pattern when recording the data block by using that specific data pattern instead of storing contents of the data block into an external storage device.

RELATED PATENT APPLICATION

[0001] The present patent application claims priority to co-pending Japanese Application No. 2001-353775, filed on Nov. 19, 2001.

BACKGROUND OF THE INVENTION

[0002] 1. Technical Field

[0003] The present invention relates to storage devices in general, and in particular to an external storage device a computer network.

[0004] 2. Description of the Related Art

[0005] Hard disks are often used to store data processed by a computer system. Generally speaking, a hard disk has a relatively low cost per bit and a relatively high storage capacity. However, since a hard disk relies upon mechanical actions, such as rotation of a disk or movement of a magnetic head, for reading and writing data, the access speed of the hard disk is much slower than a solid state storage device that is capable of reading and writing data electrically.

[0006] Japanese patent JP-A-2000-29636 discloses a semiconductor disk device that is capable of compressing and writing data. According to JP-A-2000-29636, data is compressed to reduce cost per bit of the semiconductor disk device. However, since the efficiency of data compression depends on the contents of data being compressed, it is very difficult to implement the semiconductor disk device as an external storage device with a specific storage capacity larger than a semiconductor memory included therein.

[0007] Consequently, it would be desirable to provide an improved external storage device that is capable of storing data efficiently in a cost-effective manner.

SUMMARY OF THE INVENTION

[0008] In accordance with a preferred embodiment of the present invention, an external storage device for storing data comprises judgment means and access processing means. The judgment means determines whether or not a data block can be recorded by using a specific data pattern. The judgment means determines that a data block can be recorded by using a specific data pattern when the data block and the data pattern are coincident with each other. The access processing means stores identification information for identifying a specific data pattern when recording the data block by using that specific data pattern instead of storing contents of the data block into an external storage device.

[0009] All objects, features, and advantages of the present invention will become apparent in the following detailed written description.

DESCRIPTION OF THE DRAWINGS

[0010] The invention itself, as well as a preferred mode of use, further objects, and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:

[0011]FIG. 1 is a diagram of a computer network configuration according to a preferred embodiment of the present invention;

[0012]FIG. 2 is a block diagram of a data structure of a storage area provided by an external storage device, according to a preferred embodiment of the present invention;

[0013]FIG. 3 is a block diagram of an external storage device, according to a preferred embodiment of the present invention;

[0014]FIG. 4 is a block diagram of a data structure of a semiconductor memory, according to a preferred embodiment of the present invention;

[0015]FIG. 5 is a block diagram of a position table according to a preferred embodiment of the present invention;

[0016]FIG. 6 is a block diagram of a data structure of a hard disk according to a preferred embodiment of the present invention;

[0017]FIG. 7 is a block diagram of a registration table according to a preferred embodiment of the present invention;

[0018]FIG. 8 is an example of a storage form of data stored in the external storage device;

[0019]FIG. 9 is a high-level logic flow diagram of a data write process within an external storage device, according to a preferred embodiment of the present invention;

[0020]FIG. 10 is a high-level logic flow diagram of a data readout process within an external storage device, according to a preferred embodiment of the present invention;

[0021]FIG. 11 is a block diagram of a coincidence detection circuit of an object data block and a data pattern, according to a preferred embodiment of the present invention; and

[0022]FIG. 12 is a block diagram of a hardware structure of an external storage device, according to a preferred embodiment of the present invention.

DESCRIPTION OF A PREFERRED EMBODIMENT

[0023] Referring now to the drawings and, in particular, to FIG. 1, there is illustrated a diagram of a computer network configuration, in accordance with a preferred embodiment of the present invention. As shown, a computer system 100 of the present embodiment includes an external storage device 110, a computer 120, and a network 140. The external storage device 110 is an external storage device for storing each data block obtained by dividing data, such as files, received from an external apparatus such as the computer 120 in block units of a previously specified length. The external storage device 110 of the present embodiment has a capacity of 16 GB. The external storage device 110 of the present embodiment uses a volatile semiconductor memory of 2 GB as a first recording medium, and a nonvolatile recording medium of 18 GB as a second recording medium. The external storage device 110 may use a volatile semiconductor memory such as an SRAM or a DRAM, a nonvolatile semiconductor memory such as a flash memory or an IC card memory, an optical recording medium such as a DVD or a PD, a magneto-optical recording medium such as an MD, a magnetic recording medium such as a hard disk, a tape medium, or the like. Similarly, the external storage device 110 may use a volatile semiconductor memory such as an SRAM or a DRAM, a nonvolatile semiconductor memory such as a flash memory or an IC card memory, an optical recording medium such as a DVD or a PD, a magneto-optical recording medium such as an MD, a magnetic recording medium such as a hard disk, a tape medium, or the like. However, part of functions of the external storage device 110 of the present embodiment is preferable if an access speed of the second recording medium is lower than the first recording medium.

[0024] The computer 120 executes a program and accesses the external storage device 110 through the network 140 in accordance with instructions of the program. The network 140 is a local-area network for connecting the external storage device 110 and the computer 120. The network 140 may also be a public line network such as the Internet or telephone line, or various networks by dedicated communication networks such as Server Network (SAN). The computer 120 may be directly connected to the external storage device 110 by using IDE connection, E-IDE connection, SCSI connection, USB connection, or fiber channel connection, without using the network 140.

[0025]FIG. 2 shows a data structure of a storage area provided by the external storage device 110 of a preferred embodiment of the present invention. As shown, the external storage device 110 stores data in a block unit of 512 B (byte). The external storage device 100 may also use other block sizes, such as 256 B, 1024 B, or 2048 B. The computer 120 regards the external storage device 110 as a storage device having a storage capacity of 16 GB (512 byte×32 Mega=16 Giga byte) including 32 M (Mega) blocks of 512 B (byte) and accesses it. On the other hand, in the external storage device 110, a data block storage area used for storing a data block in the first storage recording medium has a storage capacity smaller, than the first recording medium. Accordingly, the external storage device 110 provides the storage area to the computer 120 with the storage capacity larger than the storage capacity of the data block storage area.

[0026] The computer 120 uses, as an example of an access to the external storage device 110, a write access of writing a data block of 512 B into a specific block in the external storage device 110, a readout access of reading out a data block of 512 B from a specific block in the external storage device 110, and a capacity readout access of requesting readout of capacity information indicating the storage capacity of the external storage device 110. If data of less than 512 B is written into the external storage device 110, the computer 120 causes the write access to include size designation of the data to be written. The external storage device 110 and the computer 120 may support an access in a cluster unit integer times as large as the block in addition to these accesses.

[0027]FIG. 3 shows a structure of the external storage device 110 of a preferred embodiment of the present invention. As shown, the external storage device 110 includes a semiconductor memory 200, a hard disk 210, a communication interface 245, a capacity management part 247, a judgment part 275, a registration part 274, an access processing part 277, and a pattern replacement part 292. The semiconductor memory 200 is an example of the first recording medium of the invention. The hard disk 210 is an example of the second recording medium of the present invention.

[0028] The semiconductor memory 200 is a recording medium of a volatile semiconductor memory. In present embodiment, the semiconductor memory 200 has a capacity of 2 GB. The semiconductor memory 200 includes a position table 310 and an M data block storage area 320. The position table 310 causes information of 4 B indicating a storage position of a data block stored in the external storage device 110 to correspond to each of the blocks of the external storage device 110 shown in FIG. 2 and stores it. The M data block storage area 320 is a data area for storing contents of the data block into the semiconductor memory 200. The M data block storage area 320 of this embodiment divides data received from the computer 120 into M blocks (memory blocks) each being a block of 64 B and stores them.

[0029] The hard disk 210 is a nonvolatile recording medium. The hard disk 210 of the present embodiment has an access speed lower than the semiconductor memory 200. The hard disk 210 of the present embodiment divides data received from the computer 120 into H blocks (hard disk blocks) each being a block of 512 B and stores them. The hard disk 210 of the present embodiment has a capacity of 18 GB. The communication interface 245 performs a transmission and reception processing concerning access from the computer 120.

[0030] After receiving a capacity readout access from the computer 120 through the network 140, the capacity management part 247 returns capacity information indicating a storage capacity larger than a storage capacity of the M data block storage area 320 in the semiconductor memory 200 to the computer 120. The external storage device 110 of this embodiment has a storage capacity of 16 GB as shown in FIG. 2. Accordingly, the capacity management part 247 returns the capacity information indicating the storage capacity of 16 GB larger than the storage capacity of 2 GB of the semiconductor memory 200 to the computer 120.

[0031] The capacity information may not be the storage capacity itself but may be a parameter value used for calculation of the storage capacity. The capacity information may be information including, for example, number of blocks, number of sectors, number of trucks, number of cylinders, and/or block size, instead of the storage capacity itself. For example, if the computer 120 is connected to the external storage device 110 through SCSI, the computer 120 may acquire the number of blocks of the external-storage device 110 and the block size by using a Read Capacity command as an example of the capacity readout access.

[0032] After receiving a data block write access from the computer 120, the judgment part 275 determines that a write object data block should be stored into which of the position table 310, the M data block storage area 320, and the hard disk 210. The judgment part 275 includes a first judgment part 272 and a second judgment part 273.

[0033] After receiving the data block write access from the computer 120, the first judgment part 272 determines whether or not the object data block can be stored by using a specific data pattern. The first judgment part 272 of the present embodiment uses, as the data pattern, a data pattern stored in a registration table 276 in the registration part 274 and a data pattern by repetition of a specific data value. The first judgment part 272 has a function of registering the write object data block in the registration part 274 and enabling the object data block to be recorded by using the registered data pattern. If it is determined that the object data block can be recorded by using the specific data pattern, instead of storing the contents of the object data block into the M data block storage area 320 or the hard disk 210, the first judgment part 272 instructs the storage part 290 to store identification information as information to identify the data pattern corresponding to the object data block into the position table 310 in the access processing part 277.

[0034] If the first judgment part 272 determines that the write object data block can not be recorded by using the specific data pattern, the second judgment part 273 determines whether or not the write object data block can be stored into the M data block storage area 320 in the semiconductor memory 200. That is, first, the second judgment part 273 acquires the number of empty M blocks of the M data block storage area 320 in the semiconductor memory 200 from the storage part 290 in the access processing part 277. Next, if the number of empty M blocks of the semiconductor memory 200 is not less than 8 (that is, not less than the number of M blocks in which the data block of 512 B can be stored without compression), the second judgment part 273 determines that the object data block can be stored into the M data block storage area 320 in the semiconductor memory 200. Alternatively, the second judgment part 273 first causes the object data block to be compressed by a compression part 280 in the access processing part 277 and may make a determination based on whether a sufficient number of empty blocks to store the compressed object data block exists.

[0035] The registration part 274 causes the data pattern used by the first judgment part 272 to correspond to the identification information for identifying the data pattern and registers it. The registration part 274 includes a registration table 276 for registering information such as the data pattern used by the first judgment part 272 and by the pattern replacement part 292. Alternatively, the registration part 274 may store the registration table 276 in the semiconductor memory 200 or the hard disk 210.

[0036] The access processing part 277 includes the compression part 280, an allocation part 285, the storage part 290, a restoration part 297, and the position table 310. The compression part 280 compresses the object data block judged to be stored into the M data block storage area 320 in the semiconductor memory 200 by using compression algorithm, for example, run-length coding, Huffman coding, or Lempel-Ziv coding. According to the compression algorithm or the contents of the object data block, there is a case where eight or more M blocks are required to store the compressed object data block, and an effect of compressing the object data block can not be obtained. In such a case, the compression part 280 delivers the object data block to the allocation part 285 without compression. The compression part 280 of the present embodiment does not compress the object data block determined to be stored into the hard disk 210.

[0037] The allocation part 285 divides the object data block determined to be stored into the M data block storage area 320 in the semiconductor memory 200 into M blocks the number of which corresponds to the object data block, and allocates the M blocks. That is, the allocation part 285 divides the object data block of 512 B, which was not compressed by the compression part 280, into eight M blocks of 64 B. On the other hand, the allocation part 285 divides the object data block, which was compressed by the compression part 280, into M blocks the number of which corresponds to the size after compression. With respect to the write access of writing data of less than 512 B, the allocation part 285 divides it into M blocks the number of which is required for storage of the object data block. That is, when part of the object data block is not used, the use portion of the object data block is divided into M blocks.

[0038] The storage part 290 performs the control of access to the semiconductor memory 200 and the hard disk 210. After receiving the instruction to store the identification information of the object data block into the position table 310 in the access processing part 277 from the first judgment part 272, the storage part 290 stores the identification information of the object data block into the position table 310 in accordance with the instruction.

[0039] In the write access, the storage part 290 stores the object data block, which was determined to be stored into the M data block storage area 320 in the semiconductor memory 200, into one or more M blocks allocated by the allocation part 285. In the write access, the storage part 290 stores the object data block, which was determined to be stored into the hard disk 210, into the hard disk 210.

[0040] After receiving the readout access through the communication interface 245, the storage part 290 reads out the object data block from the position table 310, the M data block storage area 320, or the hard disk 210, and transmits it to the restoration part 297. Specifically, after receiving the readout access, the storage part 290 refers to the position table 310 and determines whether the object data block as the readout object data is stored in the semiconductor memory 200 or the hard disk 210. If the object data block is stored as the identification information in the position table 310, the storage part 290 acquires the identification information corresponding to the object data block from the position table 310, and transfers it to the pattern replacement part 292 through the restoration part 297.

[0041] If the object data block is stored in the M data block storage area 320 in the semiconductor memory 200, the storage part 290 reads out the object data block from the M data block storage area 320 in the semiconductor memory 200. On the other hand, if the object data block is stored in the hard disk 210, the storage part 290 reads out the object data block from the hard disk 210. Then, the storage part 290 transfers the object data block to the restoration part 297.

[0042] If the object data block of the readout access read out from the M data block storage area 320 in the semiconductor memory 200 is compressed, the restoration part 297 restores the object data block. Then, the restoration part 297 returns the object data block of the readout access to the computer 120 through the pattern replacement part 292. On the other hand, after receiving the identification information corresponding to the object data block from the storage part 290, the restoration part 297 transfers the received identification information to the pattern replacement part 292.

[0043] The pattern replacement part 292 acquires the identification information corresponding to the object data block from the storage part 290 through the restoration part 297. Then, the pattern replacement part 292 generates the object data block on the basis of the data pattern corresponding to the acquired identification information. When the identification information specifies the data pattern registered in the registration table 276 in the registration part 274, the pattern replacement part 292 acquires the corresponding data pattern from the registration part 274, and generates the object data block. On the other hand, after receiving the readout object data block from the restoration part 297, the pattern replacement part 292 transfers the readout object data block to the communication interface 245.

[0044]FIG. 4 shows a data structure of the semiconductor memory 200 of a preferred embodiment of the present invention. The semiconductor memory 200 includes the position table 310, management information 315, and the M data block storage area 320. The position table 310 causes information of 4B indicating a storage position of a data block stored in the external storage device 110 to correspond to each of the blocks of the external storage device 110 shown in FIG. 2 and stores it. The position table 310 includes 32 M entries corresponding to the respective blocks of the external storage device 110, and takes an area size of 128 MB (4 B×32 M entries). The information of 4B of each entry includes information indicating whether the data block is stored in the M data block storage area 320 in the semiconductor memory 200 or the hard disk 210, information indicating whether the data block is compressed, information indicating whether the data block is recorded using the specific data pattern, and information indicating the number of the M block in which the data block is stored. Alternatively, the storage part 290 may store the position table 310 and/or the management information 315 in a recording medium different from the semiconductor memory 200.

[0045] The management information 315 stores management information of 64 B used for managing the external storage device 110. The management information 315 includes an empty M block pointer to indicate an empty M block, and the number of empty M blocks.

[0046] The empty M block pointer indicates one of unused M blocks. The storage part 290 stores the unused M blocks in a one-way list form in which the beginning is indicated by the empty M block pointer. That is, the storage part 290 couples the unused M blocks with each other by writing link information indicating the number of a next unused M block into an unused M block and forms a one-way list. Then, the storage part 290 stores the number of the M block positioned at the beginning of the one-way list of the unused M blocks into the empty M block pointer. When writing the object data block into the M data block storage area 320, the storage part 290 may use a necessary number of M blocks from the beginning of the list of the empty M blocks. The storage part 290 may add an M block which becomes unnecessary as the result of writing of the object data block into the semiconductor memory 200 or the hard disk 210, to, for example, the beginning of the list of the empty M blocks. In order to facilitate securement of continuous empty M blocks, the storage part 290 may, for example, periodically rearrange the one-way list of empty M blocks in numerical order of the M blocks. The storage part 290 may, for example, periodically move active M blocks so that empty M blocks are arranged as continuously as possible.

[0047] The number of empty M blocks stores the number of unused M blocks. When acquiring an empty M block from the list of empty M blocks or adding an empty M block into the list of empty M blocks, the storage part 290 updates the number of empty M blocks.

[0048] Instead of using the storage method of the empty M blocks described above, the management information 315 may store the empty M blocks by using, for example, a method of using a bit map having bits corresponding to the respective M blocks and becoming “1” in the case where the M block is empty.

[0049] The M data block storage area 320 is a data area of M blocks stored in the semiconductor memory 200. The M data block storage area 320 is an example of the data block storage area of this invention. The M data block storage area 320 stores (30 M-1) M blocks of 64 B. Accordingly, the area size of the M data block storage area 320 becomes 1920 MB−64 B (30 M×64 B−64 B). The numbers of 0 to X (X=30 M−2) are allocated to the M blocks and they are identified by using the numbers.

[0050]FIG. 5 shows an example of the position table 310 of a preferred embodiment of the present invention in a table form. The position table 310 includes respective fields of a compression flag 311, a HDD flag 312, a pattern replacement flag 313, and a position information 314. The HDD flag 312, the pattern replacement flag 313, and the position information 314 are examples of a position information part of this invention.

[0051] The compression flag 311 is a field for storing “0” when the object data block is compressed and is not stored, and “1” when it is compressed and is stored. The HDD flag 312 is a field for storing “0” when the object data block is stored in the M data block storage area 320 in the semiconductor memory 200, and “1” when it is stored in the hard disk 210. The pattern replacement flag 313 is a field for storing “1” when the object data block is recorded by using the specific data pattern, and “0” when it is not stored by using the specific data pattern (i.e., when it is stored in the M data block storage area 320 or the hard disk 210).

[0052] The position information 314 stores the identification information of the data pattern when the object data block is recorded by using the specific data pattern. When the object data block is stored in one or more M blocks, the position information 314 stores the number of the leading M block. On the other hand, when the object data block is stored in the H block, the object data block is stored in the H block specified by the block number on the position table 310.

[0053] As set forth above, the position table 310 stores the identification information of the data pattern corresponding to the object data block or the information indicating the storage position of the object data block, which is made to correspond to each of the object data blocks obtained by dividing the write object data in H block units. That is, when storing the object data block by using the specific data pattern, the storage part 290 stores the identification information of the specific data pattern into the position information 314. On the other hand, when storing the object data block into the M data block storage area 320, the storage part 290 stores, as information indicating the storage position of the object data block, HDD flag=“0” (i.e., indicating the inside of the semiconductor memory 200) and the storage position of the M block (the number of the M block) into the position table 310. When storing the object data block into the hard disk 210, the storage part 290 stores, as information indicating the storage position of the object data block, HDD flag=“1” (i.e., indicating the corresponding H block in the hard disk 210) into the position table 310.

[0054] The storage part 290 stores the object data block by using one of six methods exemplified in respective lines of FIG. 5.

[0055] (0) Object Data Block is Compressed and is Stored into the M Data Block Storage Area 320

[0056] When the object data block is compressed and is stored into the M data block storage area 320, the storage part 290 sets the compression flag 311 to “1”, the HDD flag 312 to “0”, the pattern replacement flag 313 to “0”, and the position information 314 to the position of the M block on the M data block storage area 320 storing the object data block.

[0057] (1) Object Data Block is not Compressed but is Stored into the M Data Block Storage Area 320

[0058] When the object data block is not compressed but is stored into the M data block storage area 320, the storage part 290 sets the compression flag 311 to “0”, the HDD flag 312 to “0”, the pattern replacement flag 313 to “0”, and the position information 314 to the position of the M block on the M data block storage area 320 storing the object data block.

[0059] (2) Object Data Block is not Compressed but is Stored into the Hard Disk 210

[0060] When the object data block is not compressed but is stored into the hard disk 210, the storage part 290 sets the HDD flag 312 to “1” and the pattern replacement flag 313 to “0”. When the second judgment part 273 determines that the object data block is stored into the hard disk 210, the allocation part 285 and the storage part 290 store the object data block into the H block specified by the write access. That is, for example, when receiving the write access of writing the object data block into block 3 of the external storage device 110, the allocation part 285 and the storage part 290 store the object data block into the third H block in the hard disk 210.

[0061] (3) Object Data Block is Recorded by Using a Specific Data Pattern

[0062] When the object data block is recorded by using the specific data pattern, the storage part 290 sets the pattern replacement flag 313 to “1”, and the position information 314 to the identification information etc. of the data pattern.

[0063] When it is determined that the object data block is coincident with the data pattern of the identification information “00”+5 bit except for a partial data value, the first judgment part 272 selects the third storage form. The storage part 290 causes offset information of 9 bits indicating the position of the incoincident data value in the object data block and the incoincident data value of 1 B to correspond to the identification information of the data pattern and stores them into the position information 314.

[0064] When receiving the readout access, first, the pattern replacement part 292 acquires the data pattern corresponding to the identification information from the registration part 274. Then, the pattern replacement part 292 replaces the data at the position specified by the offset information of the position information 314, in the data pattern acquired from the registration part 274, with the data value of the position information 314. As such, the pattern replacement part 292 can generate the object data block on the basis of the information stored in the third storage form.

[0065] When this storage form is used, the access processing part 277 can store the object data block different from the data pattern in any 1 B by using the data pattern.

[0066] (4) Object Data Block is Recorded by Using a Specific Data Pattern

[0067] When it is determined that the object data block is coincident with the data pattern of the identification information “01”+5 bit except for partial data values, the first judgment part 272 selects the fourth storage form. The storage part 290 causes two incoincident data values of 1 B to correspond to the identification information of the data pattern and stores them into the position information 314. The registration table 276 registers two pieces of offset information for specifying the positions of the respective data values in the object data block, which are made to correspond to the data pattern of the identification information “01”+5 bit. Accordingly, the first judgment part 272 can select this storage form in the case where only the data values of the positions specified by the offset information registered in the registration table 276 become incoincident.

[0068] After receiving the readout access, the pattern replacement part 292 acquires the data pattern corresponding to the identification information, the first offset information corresponding to the first data value, and the second offset information corresponding to the second data value from the registration part 274. Then, the pattern replacement part 292 replaces, in the data pattern acquired from the registration part 274, the data at the position specified by the first offset information acquired from the registration part 274 with the first data value, and replaces the data at the position specified by the second offset information acquired from the registration part 274 with the second data value. As such, the pattern replacement part 292 can generates the object data block on the basis of the information stored in the fourth storage form.

[0069] When this storage form is used, the access processing part 277 can store the object data block different from the data pattern in two data values of 1 B, the positions of which are respectively specified, by using the data pattern.

[0070] (5) Object Data Block is Recorded by Using a Specific Data Pattern

[0071] When it is determined that the object data block can be recorded by using a data pattern with repetition of a specific data value of 2B, the first judgment part 272 selects the fifth storage form. The storage part 290 stores “10”+preliminary field of 14 bits+data value of 2B as identification information made to correspond to the data value of 2B repeated in the data pattern into the position information 314.

[0072] After receiving the readout access, the pattern replacement part 292 arranges 256 data values of 2B acquired from the position information 314 to generate the object data block. As such, the pattern replacement part 292 can generate the object data block on the basis of the information stored in the fifth storage form.

[0073] When this storage form is used, the access processing part 277 can store the object data block with the repetition of the specific data value by using the data pattern.

[0074] In the respective storage forms, the access processing part 277 stores the information indicating the position of the M data block storage area 320 storing the object data block in the case of (0) and (1), and stores the identification information corresponding to the object data block in the case of (3) to (5) into the position information 314. As such, the access processing part 277 can reduce the storage capacity required for storage of the position table 310, when comparing (0) to (1) and (3) to (5) with the case of storage into separate recording areas.

[0075] As described above, the external storage device 110 of this embodiment uses the data value of 1 B as the data value by which the object data block and the data pattern are not coincident with each other. The external storage device 110 of the present embodiment uses the data value of 2 B as the data value used for generating the data pattern with the repetition of the specific data value. The external storage device 110 may use a data value of arbitrary length less than the object data block, such as 4 bit, 4 B or 8 B. In order to suppress the storage capacity of the position table 310, it is desirable that the external storage device 110 uses a data value of such length that the identification information can be stored in the position information 314.

[0076]FIG. 6 shows a data structure of the hard disk 210 of a preferred embodiment of the present invention. The hard disk 210 includes an H data block storage area 340 and a backup area 345. The H data block storage area 340 is a data area of H blocks stored into the hard disk 210. The H data block storage area 340 stores 32 M H blocks of 512 B. Accordingly, the size of the H data block storage area 340 is 16 GB (32 M×512 B). The numbers of 0 to Y (Y=32 M−1) are allocated to the H blocks, and they are identified by using the numbers. The H data block storage area 340 is an area on the hard disk 210 used for storing the object data block of the write access from the computer 120. The H data block storage area 340 of the present embodiment has the same structure as the data structure of the external storage device 110 shown in FIG. 2. When receiving the capacity readout access from the computer 120, the capacity management part 247 returns the capacity information indicating the capacity of the area of the H data block storage area 340 to the computer 120. Alternatively, the capacity management part 247 may return capacity information indicating the capacity except the area used for management of files stored in the H data block area 340 to the computer 120.

[0077] The backup area 345 is an area used for backup of data in the semiconductor memory 200. When the power source of the external storage device 110 is turned OFF, the storage part 290 stores the data of the semiconductor memory 200 into the backup area 345. When the power source of the external storage device 110 is turned ON, the storage part 290 stores the data of the backup area 345 into the semiconductor memory 200.

[0078]FIG. 7 shows an example of the registration table 276 of a preferred embodiment of the present invention in a table form. The registration table 276 includes respective fields of identification information, data pattern, first offset information, second offset information, and number of references. The identification information field stores identification information for identifying a data pattern of the line. Alternatively, the registration table 276 may determines identification information corresponding to the line on the basis of a position in the registration table 276.

[0079] The data pattern field stores the data pattern of the line. The first offset information and second offset information fields indicate positions of incoincident data values in the object data block, which the first judgment part 272 and the pattern replacement part 292 use in the fourth storage form in FIG. 5.

[0080] The field of the number of references indicates the number of object data blocks which the external storage device 110 stores by using the data pattern of the line. When the object data block is stored by using a data pattern registered in the registration table 276, the first judgment part 272 increases the number of references corresponding to the data pattern by one. When the data block stored by using the data pattern registered in the registration table 276 is replaced by a different data block, the first judgment part 272 decreases the number of references corresponding to the data pattern by one.

[0081] The first judgment part 272 has a function of registering a write object data block as a new data pattern in the registration part 274, and making the object data block recordable by using the registered data pattern. When the write object data block is registered in the registration part 274, the registration part 274 changes or replaces a line corresponding to a data pattern determined to have the minimum number of references, to or by the data pattern to be registered. As such, the registration part 274 can make a frequently used data pattern remain in the registration table 276.

[0082] When the data pattern in the registration part 274 is changed or replaced, the first judgment part 272 causes all blocks using the changed or replaced data pattern to be stored into the M data block storage area 320 or the hard disk 210. That is, the first judgment part 272 searches blocks using the changed or replaced data pattern from the position information 314 in the position table 310. Next, the first judgment part 272 generates the object data block corresponding to the data pattern through the storage part 290 and the pattern replacement part 292, and transmits it to the second judgment part 273. Then, the access processing part 277 stores the generated object data block into the M data block storage area 320 or the hard disk 210 through the compression part 280, the allocation part 285, and the storage part 290. If the generated object data block is stored into the M data block storage area 320, the access processing part 277 performs a similar processing to the case where the object data block of the write access is stored. That is, the access processing part 277 may compress the generated object data block by the compression part 280 to store it into the M data block area 320. Alternatively, the access processing part. 277 may store the generated object data block into the M data block area 320 without compression.

[0083] Otherwise, the registration part 274 may perform, for example, periodically the above operation so as to cause the number of references of a block using a data pattern having the number of references smaller than a predetermined value to approach 0. As such, it is possible to reduce a processing time in which the first judgment part 272 registers the data pattern in the registration part 274.

[0084]FIG. 8 shows an example of a storage form of data stored in the external storage device 110 of a preferred embodiment of the present invention. The storage part 290 uses one of the six storage methods shown in FIG. 5 to store the object data block. The storage methods (zero and first in FIG. 5) to the M data block storage area 320 can be further divided into three storage methods as described below.

[0085] (1-A) Object Data Block is Compressed and is Stored by Using One M Block

[0086] When the size of the object data block becomes 63 B or less as the result of compression, the allocation part 285 and the storage part 290 store the object data block by using one M block. The storage part 290 stores the M block in a form shown as an M block 330 a.

[0087] The M block 330 a includes a link flag of 1 bit, a size field of 7 bits, and a data field of 63 B. The link flag is a flag becoming “1” in the case where the M block has link information indicating a subsequent M block. Since the M block 330 a has no link information, the leading one bit is “0”. The size field (sz in the drawing) indicates a size (0 to 63 B) of the object data block after compression. The data field (data in the drawing) is a storage area of the object data block.

[0088] (1-B) Object Data Block is Compressed and is Stored by Using Two or More M Blocks

[0089] When the size of the object data block becomes 64 B or more as the result of compression, the allocation part 285 and the storage part 290 store the object data block by using two or more M blocks. The storage part 290 stores the M blocks in forms shown as an M block 330 b and an M block 330 c.

[0090] The M block 330 b is an M block corresponding to the beginning of the object data block. The M block 330 b includes a link flag of 1 bit, a size field of 9 bits, a data field of 58 B, and link information of 4 B. The link flag is a flag similar to the link flag in (1-A). Since the M block 330 b has the link information, the leading one bit is “1”. The size field (sz in the drawing) indicates the size (0 to 512 B) of the object data block after compression. The data field (data in the drawing) is a storage area of data of the object data block. The link field (link in the drawing) indicates the number of a subsequent M block.

[0091] The M block 330 c is an M block corresponding to the second or the following of the object data block. The M block 330 c includes a data field of 60B and link information of 4B. The data field (data in the drawing) is a storage area of the object data block. The link field (link in the drawing) indicates the number of a subsequent M block.

[0092] As stated above, when the object data block is stored by using two or more M blocks, the storage part 290 stores the M blocks, the number of which corresponds to the size of the object data block after compression shown in the size field, as a one-way list using the link information. That is, in the case where the object data block is stored into the M data block storage area 320 by using two or more M blocks, the storage part 290 stores the information indicating the position of the first M block for storing the object data block into the position table 310, and stores the link information as the information indicating the position of the subsequent M block of each M block into each of the plural M blocks for storing the object data block.

[0093] (2) Object Data Block is Not Compressed but is Stored by Using Eight M Blocks

[0094] When the compression part 280 did not compress the object data block, the access processing part 277 stores the object data block by using eight continuous M blocks.

[0095] Correspondingly to the storage methods (1-A), (1-B) and (2) described above, the storage part 290 and the restoration part 297 read out the object data block by using the following methods.

[0096] (1-A) With Respect to a Readout Object Block, Compression Flag=1, HDD Flag=0, and Link Flag=0

[0097] The storage part 290 reads out one M block specified by the position information in the position table 310 and corresponding to the readout object block. The restoration part 297 restores the object data block read out by the storage part 290 and transmits it to the computer 120 through the pattern replacement part 292 and the communication interface 245.

[0098] (1-B) With Respect to a Readout Object Block, Compression Flag=1, HDD Flag=0, and Link Flag=1

[0099] The storage part 290 reads out plural M blocks specified by the position information in the position table 310 and corresponding to the readout object block from the semiconductor memory 200 on the basis of the link information. The restoration part 297 restores the object data block read out by the storage part 290 and transmits it to the computer 120 through the pattern replacement part 292 and the communication interface 245.

[0100] (2) With Respect to a Readout Object Block, Compression Flag=0 and HDD Flag =0

[0101] The storage part 290 reads out eight continuous M blocks specified by the position information of the position table 310 and corresponding to the readout object block from the semiconductor memory 200. The restoration part 297 transmits the object data block read out by the storage part 290 to the computer 120 through the pattern replacement part 292 and the communication interface 245.

[0102]FIG. 9 shows a flow of a data write processing of the external storage device 110 of a preferred embodiment of the present invention. The computer 120 transmits a capacity readout access to the external storage device 110 at, for example, the time of starting or the time of connection of the external storage device 110. The capacity management part 247 receives the capacity readout access through the network 140 and the communication interface 245 (S700). Next, the capacity management part 247 returns the capacity information indicating the storage capacity of the external storage device 110 to the computer 120 (S701).

[0103] Next, the judgment part 275 receives a write access from the computer 120 through the network 140 and the communication interface 245 (S702). Next, the first judgment part 275 determines whether or not the object data block can be recorded by using a specific data pattern (S703). When the first judgment part 272 determines that the object data block can be recorded by using the specific data pattern (S704), instead of storing the contents of the object data block into the M data block storage area 320 or the hard disk 210 in the external storage device 110, the access processing part 277 stores identification information etc. of the specific data pattern into the position table 310 (S750).

[0104] If the first judgment part 272 determines that the object data block can not be recorded by using a specific data pattern, the second judgment part 273 determines whether or not the object data block can be stored into the M data block storage area 320. That is, the second judgment part 273 checks whether or not the number of empty M blocks of the M data block storage area 320 is eight or more (S705). If the number of empty M blocks of the M data block storage area 320 is less than eight, the second judgment part 273 determines that the object data block is stored into the hard disk 210. Then, the storage part 290 acquires the object data block through the compression part 280 and the allocation part 285, and stores it into the H block corresponding to the block number specified by the write access from the computer 120 (S740).

[0105] Otherwise, if the number of empty M blocks of the M data block storage area 320 is eight or more, the second judgment part 273 determines that the object data block is stored into the M data block storage area 320. Next, the compression part 280 acquires the object data block from the judgment part 275 and compresses it (S710). Next, the compression part 280 determines whether or not the number of M blocks required for storing the compressed object data block is seven or less (S715). When the number of M blocks required for storing the compressed object data block is seven or less, the compression part 280 makes the compressed object data block the object data block to be stored into the semiconductor memory 200 (S720). Otherwise, when the number of M blocks required for storing the compressed object data block is eight or more, the compression part 280 makes the original object data block the object data block to be stored into the M data block storage area 320 (S725).

[0106] Next, the allocation part 285 acquires the object data block from the compression part 280, divides it into M blocks the number of which corresponds to the object data block, and allocates these M blocks (S730). Next, the storage part 290 stores the object data block into the M blocks the number of which is allocated by the allocation part 285 (S735). Next, the storage part 290 updates the position table 310 on the basis of the processing content of S735 or S740 (S745).

[0107]FIG. 10 is a high-level logic flow diagram of a data readout processing of the external storage device 110 of a preferred embodiment of the present invention. First, the storage part 290 receives a readout access from the computer 120 through the communication interface 245 (S800). Next, the storage part 290 reads out the information indicating the storage position of the object data block of the readout access from the position table 310 on the semiconductor memory 200 (S810).

[0108] Next, the storage part 290 determines whether or not the pattern replacement flag concerning the object data block is “1” (S815). When the pattern replacement flag is “1”, the storage part 290 transfers information, such as the position information 314, concerning the object data block to the pattern replacement part 292 through the restoration part 297. The pattern replacement part 292 generates the object data block on the basis of the information, such as the position information 314, concerning the object data block (S817), and returns it to the computer 120 through the communication interface 245 (S880).

[0109] If the pattern replacement flag is “0” at S815, the storage part 290 judges whether or not the HDD flag concerning the object data block is “0” (S820). If the HDD flag is not “0”, the storage part 290 reads out the object data block from the hard disk 210 (S825). Then, the storage part 290 transfers the object data block to the pattern replacement part 292, and causes the pattern replacement part 292 to perform the processing of S880.

[0110] If the HDD flag is “0” at S820, the storage part 290 judges whether or not the compression flag concerning the object data block is “1” (S830). If the compression flag is not “1”, the storage part 290 reads out eight continuous M blocks specified by the position information from the M data block storage area 320, and acquires the object data block (S835). Then, the storage part 290 transfers the object data block to the pattern replacement part 292 and causes the pattern replacement part 292 to perform the processing of S880.

[0111] If the compression flag is “1” at S830, the storage part 290 reads out the leading M block specified by the position information (S840). Then, the storage part 290 determines whether or not the link flag of the leading M block is “0” (S850). If the link flag is “0”, the storage part 290 regards the M block acquired at S840 as the object data block and transfers it to the pattern replacement part 292.

[0112] If the link flag is “1” at S850, the storage part 290 reads out plural M blocks included in the one-way list on the basis of the size field of the leading M block and the link field of each M block (S860). Then, the storage part 290 regards the plural read out M blocks as the object data block, and transfers them to the pattern replacement part 292. Next, the restoration part 297 restores the object data block transferred from the storage part 290 at S850 or S860 (S870). Next, the pattern replacement part 292 transmits the object data block obtained by performing the processing of S817, S825, S835 or S870 to the computer 120 through the communication interface 245 (S880).

[0113]FIG. 11 is a block diagram of a coincidence detection circuit of an object data block and a specific data pattern, which is included in the first judgment part 272 of a preferred embodiment of the present invention. The coincidence detection circuit includes a data register 1100, a coincidence detection circuit A1160, a coincidence detection circuit B1170, a coincidence detection circuit C1180 and a selection part 1150.

[0114] The data register 1100 receives each data value of the write object data block from the communication interface 245, and outputs it to the coincidence detection circuit A1160, the coincidence detection circuit B1170, the coincidence detection circuit C1180 and the selection part 1150. The coincidence detection circuit A1160 uses a data pattern (leading two bits=“10” of the identification information) by repetition of a data value of the beginning of the object data block to determine whether the object data block can be recorded. When the object data block and the data pattern (leading two bits=“01” of the identification information) are coincident with each other except for two data values of 1 B located at the positions specified by the first and/or second offset information in the registration table 276, the coincidence detection circuit B1170 judges that the object data block can be recorded by using the data pattern. When the object data block and the data pattern (leading two bits=“00” of the identification information) are coincident with each other except for a data value of 1 B located at an arbitrary position, the coincidence detection circuit C1180 judges that the object data block can be recorded by using the data pattern. The selection part 1150 selects one of the identification information by the coincidence detection circuit A1160, the identification information by the coincidence detection circuit B1170, the identification information by the coincidence detection circuit C1180, and the contents of the object data block, which is to be used for storing the object data block.

[0115] The coincidence detection circuit B1170 is separately allocated to each of entries of the data patterns (leading two bits=“01” of the identification information) which can be registered in the registration table 276. Similarly, the coincidence detection circuit C1180 is separately allocated to each of entries of the data patterns (leading two bits=“00” of the identification information) which can be registered in the registration table 276. In FIG. 11, only one typifying them is shown for each of the coincidence detection circuit B1170 and the coincidence detection circuit C1180.

[0116] The coincidence detection circuit A1160 includes a leading data register 1102, a comparison arithmetic unit 1110, and a comparison result register 1114. The leading data register 1102 stores the leading data value of the object data block. The comparison arithmetic unit 1110 compares each data value of the object data block in the data register 1100 with the data value of the leading data register 1102. The comparison arithmetic unit 1110 outputs “0” in a coincident case and “1” in an incoincident case at each comparison of the respective data values.

[0117] The comparison result register 1114 accumulates the comparison result by the comparison arithmetic unit 1110 for each object data block. That is, the comparison result register 1114 is set to “0” at the point of time when the data register 1110 receives the leading data value of the object data block. Then, the comparison result register 1114 accumulates the output of the comparison arithmetic unit 1110 by an OR operation until the comparison of the whole object data block is ended.

[0118] The comparison result register 1114 becomes “1” when a data value in the object data block is incoincident with the leading data register 1102. The coincidence detection circuit A1160 compares the leading data value of the object data block with the respective data values of the object data block. Then, when all of these are coincident with one another, the comparison result register 1114 outputs “0” as information indicating coincidence. The leading data register 1102 outputs “10” as information stored in the position information 314+leading data value.

[0119] The coincidence detection circuit B1170 includes a comparison arithmetic unit 1120, a comparison result register 1124, and a data value register 1126.

[0120] The comparison arithmetic unit 1120 compares a data value of the object data block in the data register 1100 with a corresponding data value of the data pattern (leading two bits=“01” of the identification information) in the registration table 276. The comparison arithmetic unit 1120 outputs “0” in a coincident case and “1” in an incoincident case at each comparison of the respective data values.

[0121] The comparison result register 1124 accumulates the comparison result by the comparison arithmetic unit 1120 for each object data block. That is, the comparison result register 1124 is set to “0” at the point of time when the data register 1100 receives the leading data value of the object data block. Then, the comparison result register 1124 accumulates the output of the comparison arithmetic unit 1120 by an OR operation until the comparison of the whole object data block is ended. When the data value under comparison is a data value specified by the first offset information of the registration part 274, the comparison result register 1124 stores the data value of the data register 1100 as a first data value into the data value register 1126. When the data value under comparison is a data value specified by the second offset information of the registration part 274, the comparison result register 1124 stores the data value of the data register 1100 as a second data value into the data value register 1126. When the data value of the data register 1100 is stored into the data value register 1126, the comparison result register 1124 regards the data values under comparison as having been coincident with each other.

[0122] The comparison result register 1124 becomes “0” when the object data block and the data pattern are coincident with each other except for two data values of 1 B located at the positions specified by the registration table 276. The coincidence detection circuit B1170 compares the object data block with the data pattern in the registration table 276. Then, in the case where they are coincident with each other except for the data values of the positions specified by the first and second offset information of the registration table 276, the comparison result register 1124 outputs “0” as information indicating coincidence. Besides, the coincidence detection circuit B1170 outputs identification information (leading two bits=“01”) as information stored in the position information 314+first data value +second data value. The coincidence detection circuit C1180 includes a comparison arithmetic unit 1130, a comparison result register 1134, a data value register 1136, and an offset register 1138.

[0123] The comparison arithmetic unit 1130 compares a data value of the object data block in the data register 1100 with a corresponding data value of the data pattern (leading two bits =“00” of the identification information) in the registration table 276. The comparison arithmetic unit 1130 outputs “0” in a coincident case and “1” in an incoincident case at each comparison of the respective data values.

[0124] The comparison result register 1134 accumulates the comparison result by the comparison arithmetic unit 1130 for each object data block. That is, the comparison result register 1134 is set to “0” at the point of time when the data register 1100 receives the leading data value of the object data block. Then, the comparison result register 1134 accumulates the output of the comparison arithmetic unit 1130 by an OR operation until the comparison of the whole object data block is ended. Here, when the data values are incoincident with each other, the comparison result register 1134 stores the incoincident data value of the data register 1100 into the data value register 1136, and stores the offset information indicating the position of the incoincident data value in the object data block into the offset register 1138. The comparison result register 1124 regards the data values under comparison as having been coincident with each other. Thereafter, when again detecting an incoincident data value concerning the object data block, the comparison result register 1134 sets “1” and records incoincidence.

[0125] The comparison result register 1134 becomes “0” when the object data block and the data pattern are coincident with each other except for a data value of 1 B located at an arbitrary position. The coincidence detection circuit C1180 compares the object data block with the data pattern in the registration table 276. Then, if they are coincident with each other except for the data value of 1 B at the arbitrary position, the comparison result register 1134 outputs “0” as information indicating coincidence. The coincidence detection circuit C1180 outputs identification information (leading two bits=“00”) as information stored in the position information 314+offset information+data value.

[0126] When the coincidence detection processing of the object data block by the coincidence detection circuit A1160, the coincidence detection circuit B1170 and the coincidence detection circuit C1180 is ended, the selection part 1150 selects the storage form of the object data block on the basis of the outputs of the comparison result register 1114, the comparison result register 1124 and the comparison result register 1134. That is, in the case where one of the comparison result register 1114, the comparison result register 1124 and the comparison result register 1134 is “0”, the selection part 1150 instructs the storage part 290 to store the object data block by using the data pattern detected by one of the coincidence detection circuit A1160, the coincidence detection circuit B1170 and the coincidence detection circuit C1180. Here, at least two of the comparison result register 1114, the comparison result register 1124 and the comparison result register 1134 are “0”, the selection part 1150 determines which data pattern is used among those detected by the coincidence detection circuit A1160, the coincidence detection circuit B1170 and the coincidence detection circuit C1180 in accordance with previously determined priority order. On the other hand, in the case where all of the comparison result register 1114, the comparison result register 1124 and the comparison result register 1134 are “1”, the selection part 1150 instructs the second judgment part 273 to store the contents of the object data block into the M data block storage area 320 or the hard disk 210.

[0127]FIG. 12 is a block diagram of the external storage device 110 according to a preferred embodiment of the present invention. The functions of the external storage device 110 of the present embodiment are realized by cooperation between a computer 500 including a CPU 510, a ROM 520, a RAM 530, a communication interface 540, a hard disk drive 550, an output device 580 and an input device 585 and a program executed on the computer 500. The computer 500 may further include a floppy disk drive 560 and/or a CD-ROM drive 570.

[0128] The program realizing the external storage device 110 includes a communication interface module, a capacity management module, a judgment module, a registration module, an access processing module, and a pattern replacement module. These modules are programs for causing the computer 500 to operate as the communication interface 245, the capacity management part 247, the judgment part 275, the registration part 274, the access processing part 277, and the pattern replacement part 292. The judgment module includes a first judgment module and a second judgment module. These modules are programs for causing the computer 500 to operate as the first judgment part 272 and the second judgment part 273. The access processing module includes a compression module, an allocation module, a storage module, and a restoration module. These modules are programs for causing the computer 500 to operate as the compression part 280, the allocation part 285, the storage part 290, and the restoration part 297. The RAM 530 and the hard disk drive 550 may be used as the recording medium for storing the contents of the semiconductor memory 200 and the hard disk 210.

[0129] The programs or modules described above may be stored in an external storage medium. As the recording medium, in addition to the floppy disk 590 and the CD-ROM 595, an optical recording medium such as a DVD or a PD, a magneto-optical recording medium such as an MD, a tape medium, or a semiconductor memory such as an IC card can be used. In addition, a storage device, such as a hard disk or a RAM, provided in a server system connected to a dedicated communication network or the Internet may be used to provide the program to the computer 500 through the network 140 or the network connected to the computer 120.

[0130] According to the external storage device 110 of the present embodiment, it is possible to provide the storage device of the combination of the semiconductor memory 200 with the relatively small capacity and the hard disk 210 with the relatively large capacity. Such an external storage device can be accessed as a large capacity hard disk with a specific storage capacity from an external computer or the like. On the other hand, since many data blocks stored into the external storage device are compressed and stored into the semiconductor memory 200, the external storage device 110 can realize an access speed close to the semiconductor memory 200.

[0131] According to the external storage device 110 of the present embodiment, the object data block can be stored into the position information 314 in the position table 310 by using the specific data pattern. With respect to the object data block stored into the position information 314 in the position table 310 by using the specific data pattern, the external storage device 110 can record the contents of the data without storing them into the M data block storage area 320 or the hard disc 210.

[0132] When initializing data or data for a file system management area is written in the external storage device 110, the computer 120 or the like often writes data blocks having the same or substantially the same contents into many blocks of the external storage device 110. In this case, instead of storing the data blocks having the same or the substantially the same contents into many M blocks, the external storage device 110 of this embodiment stores the identification information etc. of the data patterns corresponding to these data blocks into the position information 314 in the position table 310. As a result, according to the external storage device 110 of this embodiment, the number of data blocks stored into the M data block storage area 320 at initialization can be reduced. Accordingly, the external storage device 110 can store more data blocks on the semiconductor memory 200, and can realize an access speed close to the semiconductor memory 200.

[0133] When the function of storing the object data block by using the specific data pattern is not provided, the external storage device stores each of the data blocks for initialization into one or more M blocks in the M data block storage area at initialization. As a result, at the point of time when initialization is completed, all M blocks in the M data block storage area are used for storing the data blocks for initialization. Thus, the external storage device can not allocate more M blocks than the number stored as initialization data to each of the object data blocks of write accesses received later, and writes the object data blocks into the hard disk at a certain ratio. Accordingly, when the function of storing the object data block by using the specific data pattern is not provided, the external storage device receives the influence of the data blocks for initialization and reduces the average access speed of a newly written data block.

[0134] On the other hand, the external storage device 110 of the present embodiment can store almost all the data blocks for initialization into the position information 314 by using the specific data patterns. Thus, the external storage device 110 can made the M data block storage area 320 almost unused at the point of time when initialization is completed, and can store the object data block of the write access received later into the M data block storage area 320. Accordingly, since the external storage device 110 of this embodiment does not store a newly written data block into the hard disk 210 until the M data block storage area 320 is filled, the access speed can be kept high.

[0135] The external storage device 110 of the present embodiment can acquire the data block stored in the position information 314 in the position table 310 by reading out the position table 310 only once. On the other hand, the external storage device 110 acquires the storage position of the object data block by reading out the position table 310 once, and then, reads out the M data block storage area 320 at least once to acquire the object data block. Thus, by storing part of data blocks into the position information 314 in the position table 310 by using the specific data pattern, the average access speed of the semiconductor memory 200 can be raised.

[0136] The external storage device 110 of the present embodiment provides the method of storing the object data block by using the semiconductor memory 200 and the hard disk 210 different from each other in the block size. As such, the external storage device 110 can store the object data block after selecting whether it is to be stored into M blocks the number of which corresponds to the contents of the object data block or into one H block. For example, if the access speed of the semiconductor memory 200 is equal to that of the hard disk 210, this function produces an effect to raise the use efficiency of the storage area by storing data of less than 512 B at an end of a file into the semiconductor memory 200 with priority.

[0137] As described above, the external storage device 110 of the present invention realizes the function suitable for using the external storage device having a recording medium of a semiconductor memory as a substitution of an external storage device having a recording medium of a hard disk. The external storage device 110 of the present embodiment has both the feature of the hard disk and the feature of the semiconductor memory.

[0138] While the invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention. 

What is claimed is:
 1. An external storage device, comprising: judgment means for determining whether or not a data block can be recorded by using a specific data pattern; and access processing means for storing identification information for identifying a data pattern when recording a data block by using said data pattern instead of storing contents of said data block into an external storage device.
 2. The external storage device of claim 1, wherein said judgment means determines that said data block can be recorded by using said data pattern when said data block and the data pattern are coincident with each other.
 3. The external storage device of claim 1, when said data block is coincident with said data pattern except for a partial data value, said judgment means determines that said data block can be recorded by using said data pattern.
 4. The external storage device of claim 3, wherein said judgment means determines that said data block can be recorded by using said data pattern, said access processing means causes offset information indicating a position of the incoincident data value in said data block and said incoincident data value to correspond to said identification information.
 5. The external storage device of claim 3, further comprising registration means for causing offset information to indicate a position in said data pattern to correspond to said data pattern, wherein when said data block and said data pattern are coincident with each other except for a data value of said data block specified by said offset information, said judgment part determines that said data block can be recorded by using said data pattern, and when said judgment means determines that said data block can be recorded by using said data pattern, said access processing means causes said incoincident data value to correspond to said identification information.
 6. The external storage device of claim 1, said data pattern is a data pattern by repetition of a specific data value, and when said judgment means determines that said data block can be recorded by using said data pattern, said access processing means stores said identification information made to correspond to said specific data value.
 7. The external storage device of claim 6, wherein said judgment means further includes a leading data register for storing a leading data value of said data block, and determines whether or not said data block can be recorded by using said data pattern by said repetition of said leading data value of said data block, based on a comparison result between each data value in said data block and said data value in said leading data register.
 8. The external storage device of claim 1, further comprising a registration part for causing said data pattern to correspond to said identification information for identifying said data pattern, wherein said judgment means determines whether or not said data block can be recorded by using said data pattern registered by said registration part, and if said judgment part determines that said data block can be recorded by using said data pattern, said access processing part stores said identification information made to correspond to said data pattern registered by said registration part.
 9. The external storage device of claim 8, further comprising a data block storage area for storing said data block if said judgment part determines that said data block cannot be recorded by using said data pattern, and if said data pattern registered by the registration part is changed, said access processing part uses said data pattern to be changed to generate contents of said data block stored by using said data pattern to be changed, and stores said contents into said data block storage area.
 10. The external storage device of claim 9, wherein said registration part causes number of references, as the number of the data blocks stored by the access processing part using said data pattern, to correspond to said identification information for identifying said data pattern, and when a data pattern is newly registered in said registration part, among one or more data patterns registered in the registration part, a data pattern determined to have a minimum number of references is replaced by said new data pattern.
 11. The external storage device of claim 1, further comprising a data block storage area for storing said data block, wherein said access processing part includes a position information part for storing position information indicating a storage position of said data block, for storing said identification information into said position information part if said judgment part determines that said data block can be recorded by using said data pattern, and for storing information indicating a position of said data block storage area for storing said data block into said position information part if said judgment part determines that said data block cannot be recorded by using said data pattern.
 12. An external storage device, comprising: a first recording medium; a second recording medium having an access speed lower than said first recording medium; a first judgment part for, if said data block is written in said external storage device, determining whether or not said data block can be recorded by using a specific data pattern; a second judgment part for, if said data block cannot be recorded by using said data pattern, determining whether or not said data block can be stored into said first recording medium; and an access processing part for, if said first judgment part determines that said data block can be recorded by using said data pattern, instead of storing contents of said data block into said external storage device, storing identification information for identifying said data pattern into an identification information storage area in said first recording medium, for, when said second judgment part determines that said data block can be stored into said first recording medium, storing said data block into a data block storage area in said first recording medium, and for, if said second judgment part determines that said data block cannot be stored into said first recording medium, storing said data block into said second recording medium.
 13. The external storage device of claim 12, further comprising a capacity management part for, if a capacity readout access of requesting readout of capacity information indicating said storage capacity of said external storage device is received externally, returning said capacity information indicating said storage capacity larger than said data block storage area in said first recording medium.
 14. The external storage device of claim 12, said second recording medium is a nonvolatile recording medium.
 15. The external storage device of claim 12, further comprising a compression part for compressing said data block if said data block is stored in said data block storage area in said first recording medium. 